import React from 'react';
import { Provider } from 'mobx-react';
import { Route } from 'react-router';

import ViewCom from './components/View';
import SettingCom from './components/Setting';
import stores from './stores/';
import { WeaLocaleProvider } from 'ecCom';

const getLabel = WeaLocaleProvider.getLabel;

class View extends React.Component {
    render() {
        return <Provider ecId={`${this && this.props && this.props.ecId || ''}_Provider@gfi7k1`} {...stores}><ViewCom ecId={`${this && this.props && this.props.ecId || ''}_ViewCom@4uruzd`} {...this.props} /></Provider>;
    }
}

class Setting extends React.Component {
    render() {
        return <Provider ecId={`${this && this.props && this.props.ecId || ''}_Provider@5pxvbw`} {...stores}><SettingCom ecId={`${this && this.props && this.props.ecId || ''}_SettingCom@7opfay`} {...this.props} /></Provider>;
    }
}

module.exports = {
    Route: (
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@0hgkb9`} path="report" component={props => props.children}>
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@0wxzi5`} path="view" component={View} />
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@73kcwo`} path="setting" component={Setting} />
        </Route>
    ),
    com: {
        View,
        Setting,
    },
    titles: {
        'View': getLabel(508770, '门户自定义开发报告元素'),
        'Setting': getLabel(508771, '门户自定义开发报告元素设置'),
    }
};
